//request 是一个axios对象（经过设置信息的）
import request from '@/utils/request'
//上传图片
export function uploadImage(data) {
    return request({
        //设置请求数据格式为multipart/form-data
        headers: {"Content-Type": "multipart/form-data;charset=UTF-8"},
        url: '/api/user/image/upload',
        method: 'post',
        data
    })
}

export function searchOrder(data) {
    return request({
        //设置请求数据格式为multipart/form-data
        headers: {"Content-Type": "multipart/form-data;charset=UTF-8"},
        url: '/api/admin/order/page',
        method: 'post',
        data
    })
}

export function addOrder(data) {
    return request({
        //设置请求数据格式为json
        url: '/api/admin/order/insert',
        method: 'post',
        data
    });
}


export function updateOrder(data) {
    return request({
        //设置请求数据格式为json
        url: '/api/admin/order/update',
        method: 'post',
        data
    });
}

export function searchOrderById(data) {
    return request({
        //设置请求数据格式为json
        url: '/api/admin/order/selectById',
        method: 'post',
        data
    });
}

export function searchOrderByCheckoutTime(data) {
    return request({
        //设置请求数据格式为multipart/form-data
        url: '/api/admin/order/searchOrderByCheckoutTime',
        method: 'post',
        data
    })
}
